package edu.npu.cv.enums;

import com.google.common.collect.ImmutableList;
import org.commonmark.node.Link;

import java.util.LinkedList;
import java.util.List;

/**
 * @ClassName Degree
 * @Description 学位枚举
 * @Author Quentin_zyj
 * @Date 2021/10/13 20:00
 */
public class Degree {

    /** 教授 */
    public static final String PROFESSOR = "Professor";

    /** 博士后 */
    public static final String POSTDOCTORAL_FELLOW = "Postdoctoral Fellow";

    /** 博士 */
    public static final String PHD_STUDENT = "PhD Student";

    /** 研究生 */
    public static final String POSTGRADUATE_STUDENT = "Postgraduate Student";

    /** 本科 */
    public static final String UNDERGRADUATE = "Undergraduate";

    /** 毕业生 */
    public static final String ALUMNI = "Alumni";

    public static final List<String> ALL_DEGREES =
        ImmutableList.of(PROFESSOR, POSTDOCTORAL_FELLOW, PHD_STUDENT, POSTGRADUATE_STUDENT, UNDERGRADUATE, ALUMNI);

    public static LinkedList<String> getAllDegrees() {
        return new LinkedList<>(ALL_DEGREES);
    }

    public static boolean isLegal(String degree) {
        for (String item : ALL_DEGREES) {
            if (item.equals(degree))
                return true;
        }
        return false;
    }

}
